package com.version.manager.service;

import com.version.manager.entity.User;
import com.version.manager.mapper.UserMapper;
import com.version.manager.model.Msg;
import com.version.manager.vo.FrontUser;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = Exception.class)
public class UserService extends BaseService<UserMapper,User> {
    @Resource
    private UserMapper userMapper;
    public String getPassword(String companyCode,String username){
        return  userMapper.getPassword(companyCode,username);
    }

    public User getUserByCompanyCode(String companyCode,String userName){
        return userMapper.getUserByCompanyCode(companyCode,userName);
    }

    public FrontUser getFrontUser(String companyId){
        return userMapper.getFrontUser(companyId);
    }

}
